package kr.co.doriclassic.pro04_02;

import java.util.Scanner;

public class ChangeMoney {
	public static void main(String[] args) {
		int iMoney, iPrice, iVat, iExchange;
		Scanner sc = new Scanner(System.in);
		System.out.print("구입상품 금액:");
		iPrice=sc.nextInt();
		System.out.print("지불하신 금액:");
		iMoney=sc.nextInt();
		System.out.println("========================");
		System.out.println("지불금액:"+iMoney+"원");
		System.out.println("상품총액:"+iPrice+"원");
		System.out.println("부 가 세:"+(int)(iPrice*0.1)+"원");
		if(iPrice>iMoney)
		System.err.println("[error] 금액부족!!!");
		else
		System.out.println("잔    액:"+(iMoney-iPrice)+"원");
		
	}
}
